package cn.njxzc.book.masterexamples.ch14;

import java.util.*;

public class SetDemo2 {
	public static void main(String args[]) {
		Set uniques = new HashSet();
		Set dups = new HashSet();
		for (int i = 0; i < args.length; i++)
			if (!uniques.add(args[i]))
				dups.add(args[i]);
		uniques.removeAll(dups);
		System.out.println("Unique words: " + uniques);
		System.out.println("Duplicate words: " + dups);
	}
}
